import request from '@/utils/request.js'


// 获取首页数据 /home/homeList  get 
export const getHomeList=()=>request({
	url:'/home/homeList',
	method:"get"
})


//    获取商品分页列表   /portalProduct/list   GET
export const portalProduct=(data)=>request({
	url:'/portalProduct/list',
	method:"get",
	data
})

 // /portalProduct/productDetail/{productId}  获取商品详情  get 
 export const getproductDetail=(productId)=>request({
	 url:`/portalProduct/productDetail/${productId}`,
	 method:"get",
 })
 
 //  根据品牌id查询商品列表    /home/brand/{brandId}  get 
 export const brandLIst=(brandId)=>request({
	 url:`/home/brand/${brandId}`,
	 method:"get",
 })
 
 // 上传图片接口  /portalUpload/image post 
 export const uploadImage=(data)=>request({
	 url:'/portalUpload/image',
	 method:"post",
	 data
 })
 
 
 // 添加商品到购物车    /cart/add  post 
 export const AddCart=(data)=>request({
	 url:'/cart/add',
	 method:"post",
	 data
 })
